package com.code.day10.ObjectStream;

import java.io.*;

public class Demo {
    public static void main(String[] args) throws Exception {
        write();
    }
    public static void write() throws Exception{
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(new FileOutputStream("1.txt"));
        Person p1 = new Person("sss", 14);
        objectOutputStream.writeObject(p1);
        objectOutputStream.close();
    }
}
